package edu.zut.hys.api.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author Hys
 * Date 2021/12/12 0:42
 * Project microservice-template
 */
@RestController
@RefreshScope
@RequestMapping("/test")
public class TestController {

    @Value("${user}")
    String user;

    @RequestMapping("/hello")
    public String hello(){
        return "hello "+user;
    }

    @RequestMapping("/bye")
    public String bye(){
        return "hello "+user;
    }

}
